import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({

  state: {
		LeaveNote: []
  },
  mutations: {
	  LeaveData(state, data){
		if(localStorage.getItem("Leave") == null){
			state.LeaveNote.push(data)
			localStorage.setItem("Leave",JSON.stringify(state.LeaveNote))  
		}else{
			state.LeaveNote = JSON.parse(localStorage.getItem("Leave"))
			state.LeaveNote.push(data)
			localStorage.setItem("Leave",JSON.stringify(state.LeaveNote))
		}
	}
  },
  actions: {
  },
  modules: {
  }
})
